package com.linoer.cloud.alo.accountservice.controller;

import com.linoer.cloud.alo.accountservice.service.AccountService;
import com.linoer.cloud.alo.common.domain.ObjectResponse;
import com.linoer.cloud.alo.common.domain.dto.AccountDTO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Classname AccountController
 * @Description TODO
 * @Date 2021/6/23 4:39 下午
 * @Created by muhenglv
 */
@RestController
@RequestMapping("/account")
public class AccountController {

//    @Value("${useLocalCache:false}")
//    private boolean useLocalCache;

    @Autowired
    private AccountService accountService;

    @PostMapping("/decrease")
    public ObjectResponse decreaseAccount(@RequestBody AccountDTO account){
        return accountService.decreaseAccount(account);
    }
}
